﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="NewsEdit.aspx.cs"
    Inherits="CJJCH.Web.Manage.NewsEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Style/SystemCss.css" rel="stylesheet" type="text/css" />
    <script src="../JScript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../JScript/Calendar/WdatePicker.js" type="text/javascript"></script>
    <script src="../Script/JQcheck.js" type="text/javascript"></script>
    <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        window.onload = function () {
            document.getElementById("txtTitle").focus();
        }
        function checkform() {
            if (IsNothing($("#txtTitle"), "请输入标题！")) {
                return false;
            }
            if (IsNothing($("#txtAuthor"), "请输入作者！")) {
                return false;
            }
            if (IsNothing($("#txtSource"), "请输入来源！")) {
                return false;
            }
            if (document.getElementById("tdType").style.display != "none") {
                if (IsNothing($("#dropNewsType"), "请选择所属类别！")) {
                    return false;
                }
                else if (checkdigit(($("#dropNewsType")), "所属类别选择有误！")) {
                    return false;
                }
            }
            if (IsNothing($("#txtPlusDate"), "请选择发布日期！")) {
                return false;
            }
            else if (checkdate($("#txtPlusDate"), "请选择正确的日期！")) {
                return false;
            }
           
            if (CKEDITOR.instances.txtNote.getData() == "") {
                alert("请输入内容！");
                return false;
            }
            if (IsNothing($("#txtOrderNum"), "请输入显示排序号！")) {
                return false;
            }
            else if (checkdigit($("#txtOrderNum"), "显示排序请输入整数！")) {
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="BodyRight" style="width: 100%;">
            <div class="BoxHeader_Test" id="div1" runat="server">
            <div class="Left_Test">
            </div>
            <div class="BoxHeader_Test" id="divhidtop" runat="server">
                <div class="Left_Test">
                </div>
                <div class="Linkbf12" style="padding: 8px 0px 0px 10px; color: #000000; font-size: 12px;
                    font-weight: bold;">
                    <asp:HyperLink ID="lnkNews" runat="server"></asp:HyperLink>
                    >>
                    <asp:Label ID="lblNews" runat="server"></asp:Label>
                </div>
            </div>
            <div runat="server" id="divHidden" visible="false">
                <asp:Label ID="lblFirstID" runat="server"></asp:Label>
                <asp:Label ID="lblSecondID" runat="server"></asp:Label>
                <asp:Label ID="lblSecondName" runat="server"></asp:Label>
                <asp:Label ID="lblKeyword" runat="server"></asp:Label>
                <asp:Label ID="lblOrderType" runat="server"></asp:Label>
                <asp:Label ID="lblOrderKey" runat="server"></asp:Label>
                <asp:Label ID="lblThirdID" runat="server"></asp:Label>
                <asp:Label ID="lblBeTime" runat="server"></asp:Label>
                <asp:Label ID="lblEdTime" runat="server"></asp:Label>
                <asp:Label ID="lblCurPage" runat="server"></asp:Label>
            </div>
            <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
                <tr>
                    <td width="1" height="100%" class="Left">
                    </td>
                    <td height="100%" valign="top">
                        <table cellpadding="0" cellspacing="0" class="add_table" style="width: 98%; margin: 10px auto;"
                            bgcolor="#FFFFFF">
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    标题：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox ID="txtTitle" runat="server" Width="300" class="InputSearch_x1"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    作者：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox ID="txtAuthor" runat="server" Width="90" class="InputSearch_x1"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    来源：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox ID="txtSource" runat="server" Width="200" class="InputSearch_x1"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr id="tdType" runat="server">
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    所属类别：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:DropDownList ID="dropNewsType" runat="server">
                                        <asp:ListItem Text="请选择" Value=""></asp:ListItem>
                                    </asp:DropDownList>*
                                </td>
                            </tr>
                            <tr style="display: none;">
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    是否是图片新闻
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:CheckBox ID="chkIsPic" runat="server" />
                                </td>
                            </tr>
                            <tr style="display: none;">
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    图片URL：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:FileUpload ID="filePic" runat="server" /><asp:Label ID="lblPicUrl" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    是否热点：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:CheckBox ID="chkIsHot" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    是否置顶：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:CheckBox ID="chkIsTop" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    发布日期：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox runat="server" ID="txtPlusDate" onkeydown="return false;" onkeypress="return false;"
                                        onpaste="return false;" oncut="return false;" onfocus="new WdatePicker({dateFmt:'yyyy-MM-dd',skin:'blue',isShowClear:true});"
                                        CssClass="EditInPut" Width="70px"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    内容：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <textarea id="txtNote" runat="server" cols="80" rows="10"></textarea>
                                    <script type="text/javascript" language="javascript">                                        CKEDITOR.replace('txtNote', { width: '700', height: '400' });</script>
                                </td>
                            </tr>
                            <tr>
                                <td width="100px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    显示排序：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox ID="txtOrderNum" runat="server" Width="50" class="InputSearch_x1" Text="0"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    操作
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:Button ID="btnSave" runat="server" Text="保 存" Style="padding: 2px 10px 3px 10px"
                                        Width="62px" CssClass="BtnSearch_x1" OnClick="btnSave_Click" />
                                    &nbsp;
                                    <asp:Button ID="btnBack" runat="server" Text="返 回" Style="padding: 2px 10px 2px 10px"
                                        Width="62px" CssClass="BtnSearch_x1" OnClick="btnBack_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="0" height="100%" class="Right">
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
